//引入
import Main from '../pages/Main'
import Home from '../pages/Home'
import Shop from '../pages/Shop'
import Login from '../pages/Login'
import Scope from '../pages/Scope'
import My from '../pages/My'
import Exit from '../pages/Exit'
import ShopDetail from '../pages/ShopDetail'
import GiftList from '../pages/GiftList'
import ShopCar from '../pages/ShopCar'
import GiftDetail from '../pages/GiftDetail'
import HotspotDetail from '../pages/HotspotDetail'
import AddDangAn from '../pages/AddDangAn'
import Doctor from '../pages/Doctor'

//路由表
const routes = [
    {
        from: '/',
        to: '/main'
    },
    {
        path: '/main',
        component: Main,
        children: [
            {
                from: '/main',
                to: '/main/home'
            },
            {
                path: '/main/home',
                component: Home
            },
            {
                path: '/main/shop',
                component: Shop
            },
            {
                path: '/main/scope',
                component: Scope
            },
            {
                path: '/main/my',
                component: My
            }
        ]
    },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/exit',
        component: Exit
    },
    {
        path: '/shopdetail',
        component: ShopDetail
    },
    {
        path: '/giftlist',
        component: GiftList
    },
    {
        path: '/shopcar',
        component: ShopCar
    },
    {
        path: '/giftdetail/:id',
        component: GiftDetail
    },
    {
        path: '/hotspotdetail/:id',
        component: HotspotDetail
    },
    {
        path: '/adddangan',
        component: AddDangAn
    },
    {
        path: '/doctor',
        component: Doctor
    }
]


export default routes

